r = sqrt(A1(4, 4)^2 + A1(12, 4)^2);
c = A1(4, 4) / r; s = A1(12, 4) / r;
G = eye(13);
G(4, 4) = c; G(4, 12) = s; G(12, 4) = -s; G(12, 12) = c;
G2 = G;
A2 = G * A1;